﻿//////////////////////////////////////////////////////////////////////////////
//
//  Copyright © 1998-2024 Glodon Company Limited.  All rights reserved.
//
//  Use of this software is subject to the terms of the Glodon license
//  agreement provided at the time of installation or download, or which
//  otherwise accompanies this software in either electronic or hard copy form.  
//
//////////////////////////////////////////////////////////////////////////////

#pragma once

#include "GcmpModelInterface.h"
#include "GbmpQuickCast.h"
#include "IEventArgs.h"
#include "ElementId.h"


namespace gcmp
{
    class IDocument;

    enum class SpecificDbElementEventType : Int32
    {
        //ModelView create and destory
        ModelViewCreated = 0,
        ModelViewPreDeletion = 1
    };

    class GCMP_MODEL_INTERFACE_EXPORT ISpecificDbElementEventArgs : public IEventArgs
    {
        DEFINE_CAST_DERIVED(gcmp::ISpecificDbElementEventArgs, gcmp::IEventArgs);
    public:
        /// \brief 获取事件类型
        /// \return 当前发生的事件类型
        virtual SpecificDbElementEventType GetType() const = 0;

        /// \brief 获取事件相关的ElementId
        /// \return 事件相关的ElementId
        virtual ElementId GetElementId() const = 0;

        /// \brief 设置当前触发的事件
        /// \param pEvent 当前被触发的事件
        virtual void SetEvent(const IEvent* pEvent) = 0;

        /// \brief 析构函数
        virtual ~ISpecificDbElementEventArgs() = 0;

    };
}

